package com.fanfan.controller;

import com.fanfan.pojo.Pet;
import com.fanfan.pojo.domain.ResponseResult;
import com.fanfan.service.PetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/petList")
public class PetController {
    @Autowired
    PetService petService;
    @GetMapping
    public ResponseResult petList(Integer pageNum, Integer pageSize){
        return petService.petList(pageNum,pageSize);
    }
    @GetMapping("/{id}")
    public ResponseResult petDetail(@PathVariable("id") Long petId){
        return petService.peDetail(petId);
    }

}
